package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

//表示该实体类映射的数据库表名
@TableName("t_man")
public class ManBean {
    //定义主键列对应属性，value表示该属性映射的列名
    //type = IdType.AUTO 表示主键生成策略，IdType.AUTO表示利用数据库表的自动增长列填充主键列的值
    @TableId(value = "pk_manId",type = IdType.AUTO)
    private Integer id;
    //定义当前属性对应的列名
    @TableField("m_name")
    private String name;
    @TableField("m_sex")
    private String sex;
    @TableField("m_birthday")
    private LocalDate birthday;
    @TableField("m_phone")
    private String phone;

    public ManBean(String name, String sex, LocalDate birthday, String phone) {
        this.name = name;
        this.sex = sex;
        this.birthday = birthday;
        this.phone = phone;
    }

    public ManBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "ManBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", phone='" + phone + '\'' +
                "}\n";
    }
}
